﻿
    using System;
    using System.IO;
    using System.Text;
    using System.Web;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public partial class WebPage_SheZhi_api : FBasePage
    {
     

        public void Addapi()
        {
            string text = this.txtapi.Text;
            string str2 = this.txtcontent.Text;
            using (StreamWriter writer = new StreamWriter(HttpContext.Current.Server.MapPath("/apitemplate/" + text + ".htm"), false, Encoding.UTF8))
            {
                if (str2.Trim() != "")
                {
                    writer.Write(str2);
                }
            }
            base.SetSuccess("api接口生成成功");
        }

        protected void Page_Load(object sender, EventArgs e)
        {
            if (base.Request["commit"] == "提交")
            {
                this.Addapi();
            }
        }
    }


